#ifndef DYNAMIC_SLAVE_CALLS_HPP
#define DYNAMIC_SLAVE_CALLS_HPP

#include<string>
#include "SimpleJSON/JSON.hpp"

struct DynamicSlaveCalls {
	static int loadDriver(std::wstring platform);
	static int getSlaveInfo(std::wstring platform, std::wstring model,
		std::wstring& type,
		std::wstring& subType,
		std::wstring& connectionType,
		std::wstring& connectionSubType);
	static void* connectSlave(std::wstring platform, std::wstring model, int* errCode, std::wstring* errMsg);
	static int getSlaveDescriptor(std::wstring platform, void* nativeHandle,
		JSONObject* dataOut,
		JSONObject* errorWithTypeOut);
	static int callFunction(std::wstring platform, void* nativeHandle,
		const wchar_t* functionName,
		JSONObject* parasIn,
		JSONObject* dataOut,
		JSONObject* errorWithTypeOut,
		std::wstring logFilename);


private:
	//static int checkDynamicLibrary(std::wstring libname);
	static int getMFCSPressurePumpDescriptor(void* nativeHandle, JSONObject* dataOut, JSONObject* errorWithTypeOut);
};

#endif